import { Define, EntityObjectFactory } from 'tiny-entity2';
const EntityObjectType = EntityObjectFactory.GetEntityObjectType(process.env.dataBaseType || 'mysql');
@Define.Table({ TableName: 'storeextension' })
export class StoreExtension extends EntityObjectType<StoreExtension> {
    @Define.PrimaryKey()
    id: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR
    })
    ldcVersion: string;

    @Define.Column({
        DataType: Define.DataType.BOOL
    })
    ldcIsOnline: boolean;

    @Define.Column({
        DataType: Define.DataType.BIGINT
    })
    ldcLastOnlineTime: number;

    @Define.Column({
        DataType: Define.DataType.VARCHAR
    })
    ldcIPAddress: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR,
        NotAllowNULL: true,
        IsIndex: true
    })
    storeId: string;

    @Define.Column({
        DataType: Define.DataType.JSON
    })
    banners: string;

    @Define.Column({
        DataType: Define.DataType.JSON
    })
    exConfig: StoreExConfig;

    @Define.Column({
        DataType: Define.DataType.BIGINT
    })
    createTime: number;

    @Define.Column({
        DataType: Define.DataType.BIGINT
    })
    version: number;
}

export interface StoreExConfig {
    allowRechargeRule: boolean;
    otherDelivery: {
        current: 'dada';
    };
    scanOrder: {
        deliveryModes: string[];
    },
    gdMerchNo?: string;
}